Class com.symantec.itools.vcafe.openapi.VisualCafe
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.symantec.itools.vcafe.openapi.VisualCafe

Object
   |
   +----com.symantec.itools.vcafe.openapi.VisualCafe

public abstract class VisualCafe
extends Object
The VisualCafe class provides the initial and primary interface used by Visual Cafe plug-ins. Using this class a plug-in can obtain access to Visual Cafe projects, project files, source files, environment options, the clipboard, component library and more. Use the getVisualCafe() method to access the one-and-only instance of this class.

Version:
1.0
Author:
Symantec Internet Tools Division
Since:
VCafe 3.0
See Also:
getVisualCafe

Variable Index

 o CLASS_BROWSER_CLASSES_PANE_POPUP
The popup menu that appears upon right-mouse click in classes pane of class browser
 o CLASS_BROWSER_EDITOR_PANE_POPUP
The popup menu that appears upon right-mouse click in editor pane of class browser
 o CLASS_BROWSER_MEMBERS_PANE_POPUP
The popup menu that appears upon right-mouse click in members pane of class browser
 o COMP_LIBRARY_POPUP
The popup menu that appears upon right-mouse click in component library window
 o ENVIRONMENT_OPTIONS
Environment options
 o FILE_VIEW_TAB_POPUP
The popup menu that appears upon right-mouse click in files tab of project window
 o FORM_EDITOR_POPUP
The popup menu that appears upon right-mouse click in form editor window
 o OBJECT_VIEW_TAB_POPUP
The popup menu that appears upon right-mouse click in objects tab of project window
 o PACKAGE_VIEW_TAB_POPUP
The popup menu that appears upon right-mouse click in packages tab of project window
 o PROJECT_OPTIONS
Project options
 o SOURCE_EDITOR_POPUP
The popup menu that appears upon right-mouse click in source code editor window
 o UNDOCUT
The menu text for undoing a cut operation.
 o UNDODELETE
The menu text for undoing a delete operation.
 o UNDODRAGDROP
The menu text for undoing a drag-n-drop operation.
 o UNDOINSERT
The menu text for undoing an insert operation.
 o UNDOPASTE
The menu text for undoing a paste operation.
 o UNDOPROPERTYEDIT
The menu text for undoing a property edit operation.
 o visualCafe
Instance of a VisualCafe object, created at startup and always available.

Constructor Index

 o com.symantec.itools.vcafe.openapi.VisualCafe()

Method Index

 o activatePropertySheet()
Activates the Property List, showing it as needed.
 o activatePropertySheet(char)
Activates the Property List, showing it as needed, and sends the typed character to it.
 o addActiveVisualObjectListener(ActiveVisualObjectListener)
Adds an ActiveVisualObjectListener.
 o addDTListener(DTListener)
Start listening to when classes' design time information is reparsed.
 o addJarToLibrary(String)
Adds a jar file to the Component Library in Visual Cafe.
 o addOptionsMenuItemListener(int, ActionListener)
Adds an ActionListener.
 o addProjectSystemListener(ProjectSystemListener)
Start listening to changes to Visual Cafe's project system.
 o addPropertyChangeListener(PropertyChangeListener)
Starts listening for PropertyChangeEvents generated by Visual Cafe.
 o addSourceFileListener(SourceFileListener)
Adds a SourceFileListener to all SourceFiles.
 o beginUndo(String)
Call before starting an undoable operation.
 o clearUndo()
Call when starting an operation that can't be undone.
 o createDefaultProject()
Creates a new project in Visual Cafe, using the default Project Template.
 o createEmptyProject()
Creates a new project in Visual Cafe, using the Empty Project Template.
 o createProject(VisualObject)
Creates a new project in Visual Cafe, using the specified projectTemplate.
 o createVisualObject(Class)
Creates a new VisualObject that represents an object of the given class.
 o createVisualObjectByName(String)
Create a new VisualObject that represents an object of the given class.
 o endUndo()
Call when done with an undoable operation.
 o getActiveObjects()
Gets an array of VisualObjects that are active in the Property List of Visual Cafe.
 o getAttributes()
Get the Attributes object that global (program-wide) named value storage.
 o getClientAreaBounds()
Returns the dimensions of the client area of Visual Cafe's main frame window.
 o getClipboard()
Gets Visual Cafe's clipboard object.
 o getComponentLibrary()
Gets the Visual Repository object that allows access to Visual Cafe's Component Library.
 o getContextualMenu(int)
Returns a popup menu in Visual Cafe
 o getDesignTimeLookAndFeel()
Gets the current design time look-and-feel.
 o getDirectory()
Gets Visual Cafe's "current directory".
 o getEnvironmentOptionSet()
Gets the EnvironmentOptionSet object which allows access to Visual Cafe's environment options.
 o getFrontmostSourceFile()
Returns an object that represents the frontmost SourceFile window.
 o getFrontmostWindow()
Returns an object that represents the frontmost window.
 o getInstallDirectory()
Gets the installation (bin) directory of Visual Cafe.
 o getMainFrameBounds()
Returns the dimensions of Visual Cafe's main frame window.
 o getMenuBar()
Gets the top level menubar in Visual Cafe.
 o getOptionsWindow()
Returns the options window being opened in Visual Cafe.
 o getProductEdition()
Returns an object that provides information about which edition of Visual Cafe is running.
 o getProject(String)
Gets the open project with the given name in Visual Cafe.
 o getProjectTemplates()
Returns an array of all of the installed Project Templates (as appearing in the Project Templates group of the Component Library).
 o getProjects()
Returns an array of all of the open projects in Visual Cafe.
 o getSourceFile(String)
Gets the SourceFile with the specified name.
 o getSourceFile(File)
Returns a SourceFile for the given File.
 o getSourceFiles()
Returns an array of all of the open source files in Visual Cafe.
 o getTargetProject()
Gets the target or current project in Visual Cafe.
 o getVisualCafe()
Gets the object that implements the VisualCafe API.
 o invokeHelp(int)
Activates online help displaying the link specified by the given help id.
 o invokeHelp(File, int)
Activates online help displaying the link specified by the given help id, in the specified help file.
 o invokeHelp(String, int)
Activates online help displaying the link specified by the given help id, in the help file with the specified name.
 o isMDIEnabled()
Determines the current environment mode (MDI/SDI) of Visual Cafe.
 o openProject(String)
Opens the project with the given name in Visual Cafe.
 o registerEditor(String[], ActionListener)
Register an editor to edit an object of type class.
 o removeActiveVisualObjectListener(ActiveVisualObjectListener)
Removes an ActiveVisualObjectListener.
 o removeDTListener(DTListener)
Stop listening to when classes' design time information is reparsed.
 o removeOptionsMenuItemListener(int, ActionListener)
Removes a ActionListener.
 o removeProjectSystemListener(ProjectSystemListener)
Stop listening to changes to Visual Cafe's project system.
 o removePropertyChangeListener(PropertyChangeListener)
Stops the specified listener from listening for PropertyChangeEvents generated by Visual Cafe.
 o removeSourceFileListener(SourceFileListener)
Removes a SourceFileListener from all SourceFiles.
 o removeVisualObjectListener(VisualObjectListener)
Removes a VisualObjectListener from all VisualObjects.
 o runInMainUIThread(Runnable)
Executes a Runnable object in Visual Cafe's main UI thread.
 o runInMainUIThreadAndWait(Runnable)
Executes a Runnable object in Visual Cafe's main UI thread and wait for completion.
 o setActiveObjects(VisualObject[])
Sets an array of VisualObjects as active in the Property List of Visual Cafe.
 o setActiveObjects(VisualObject[], boolean)
Sets an array of VisualObjects as active in the Property List of Visual Cafe.
 o setDesignTimeLookAndFeel(LookAndFeel)
Set the current design time look-and-feel.
 o setDesignTimeLookAndFeel(String)
Set the current design time look-and-feel.
 o setDirectory(String)
Sets Visual Cafe's "current directory".
 o setMessageText(String)
Displays a message on Visual Cafe status bar.
 o setUndoCommandName(String)
Sets the undo menu item to the specified text.
 o startWaitCursor()
Indicate to the user that a lengthy operation is starting.
 o stopWaitCursor()
Indicate that a lengthy operation has ended.
 o updateDesignTimeLookAndFeelUI(Component)
Changes the look-and-feel of a JComponent to match the current design time look-and-feel.

Variables

 o CLASS_BROWSER_CLASSES_PANE_POPUP
public static final int CLASS_BROWSER_CLASSES_PANE_POPUP
The popup menu that appears upon right-mouse click in classes pane of class browser

See Also:
getContextualMenu
 o CLASS_BROWSER_EDITOR_PANE_POPUP
public static final int CLASS_BROWSER_EDITOR_PANE_POPUP
The popup menu that appears upon right-mouse click in editor pane of class browser

See Also:
getContextualMenu
 o CLASS_BROWSER_MEMBERS_PANE_POPUP
public static final int CLASS_BROWSER_MEMBERS_PANE_POPUP
The popup menu that appears upon right-mouse click in members pane of class browser

See Also:
getContextualMenu
 o COMP_LIBRARY_POPUP
public static final int COMP_LIBRARY_POPUP
The popup menu that appears upon right-mouse click in component library window

See Also:
getContextualMenu
 o ENVIRONMENT_OPTIONS
public static final int ENVIRONMENT_OPTIONS
Environment options

See Also:
getOptionsWindow
 o FILE_VIEW_TAB_POPUP
public static final int FILE_VIEW_TAB_POPUP
The popup menu that appears upon right-mouse click in files tab of project window

See Also:
getContextualMenu
 o FORM_EDITOR_POPUP
public static final int FORM_EDITOR_POPUP
The popup menu that appears upon right-mouse click in form editor window

See Also:
getContextualMenu
 o OBJECT_VIEW_TAB_POPUP
public static final int OBJECT_VIEW_TAB_POPUP
The popup menu that appears upon right-mouse click in objects tab of project window

See Also:
getContextualMenu
 o PACKAGE_VIEW_TAB_POPUP
public static final int PACKAGE_VIEW_TAB_POPUP
The popup menu that appears upon right-mouse click in packages tab of project window

See Also:
getContextualMenu
 o PROJECT_OPTIONS
public static final int PROJECT_OPTIONS
Project options

See Also:
getOptionsWindow
 o SOURCE_EDITOR_POPUP
public static final int SOURCE_EDITOR_POPUP
The popup menu that appears upon right-mouse click in source code editor window

See Also:
getContextualMenu
 o UNDOCUT
public static java.lang.String UNDOCUT
The menu text for undoing a cut operation.

See Also:
beginUndo, setUndoCommandName
 o UNDODELETE
public static java.lang.String UNDODELETE
The menu text for undoing a delete operation.

See Also:
beginUndo, setUndoCommandName
 o UNDODRAGDROP
public static java.lang.String UNDODRAGDROP
The menu text for undoing a drag-n-drop operation.

See Also:
beginUndo, setUndoCommandName
 o UNDOINSERT
public static java.lang.String UNDOINSERT
The menu text for undoing an insert operation.

See Also:
beginUndo, setUndoCommandName
 o UNDOPASTE
public static java.lang.String UNDOPASTE
The menu text for undoing a paste operation.

See Also:
beginUndo, setUndoCommandName
 o UNDOPROPERTYEDIT
public static java.lang.String UNDOPROPERTYEDIT
The menu text for undoing a property edit operation.

See Also:
beginUndo, setUndoCommandName
 o visualCafe
protected static com.symantec.itools.vcafe.openapi.VisualCafe visualCafe
Instance of a VisualCafe object, created at startup and always available.

Constructors

 o VisualCafe
public VisualCafe()

Methods

 o activatePropertySheet
public abstract void activatePropertySheet()
Activates the Property List, showing it as needed.

See Also:
activatePropertySheet(char)
 o activatePropertySheet
public abstract void activatePropertySheet(char typedCharacter)
Activates the Property List, showing it as needed, and sends the typed character to it.

Parameters:
typedCharacter - the character to send to the property sheet.
See Also:
activatePropertySheet()
 o addActiveVisualObjectListener
public abstract void addActiveVisualObjectListener(ActiveVisualObjectListener listener)
Adds an ActiveVisualObjectListener. After this call, the listener will be notified when a VisualObject is selected into the Property List.

Parameters:
listener - the object that receives notifications.
See Also:
removeActiveVisualObjectListener(), setActiveObjects(VisualObject[])
 o addDTListener
public abstract void addDTListener(DTListener listener)
Start listening to when classes' design time information is reparsed.

Parameters:
listener - the object that receives notifications.
See Also:
removeDTListener, addDTListener, DTListener
 o addJarToLibrary
public abstract void addJarToLibrary(String jarFile)
Adds a jar file to the Component Library in Visual Cafe. This performs the same action as using the Visual Cafe menus to insert a Component into the library (Insert -> Component into Library). Errors are reported in Visual Cafe's message window.

Parameters:
jarFile - the full path of the jar file to be added.
 o addOptionsMenuItemListener
public abstract void addOptionsMenuItemListener(int optionType,
                                                ActionListener l)
Adds an ActionListener. After this call, the listener will be notified when the user chooses to open Environment Options or Project Options window.

Parameters:
optionType - the type of options window. One of:
  • PROJECT_OPTIONS - the project options window
  • ENVIRONMENT_OPTIONS - the environment options window
listener - the object that receives notifications.
 o addProjectSystemListener
public abstract void addProjectSystemListener(ProjectSystemListener listener)
Start listening to changes to Visual Cafe's project system.

Parameters:
listener - the object that receives notifications.
See Also:
removeProjectSystemListener
 o addPropertyChangeListener
public abstract void addPropertyChangeListener(PropertyChangeListener listener)
Starts listening for PropertyChangeEvents generated by Visual Cafe. These occur when the bound property "design time look-and-feel" is changed.

Parameters:
listener - the object that receives notifications.
See Also:
removePropertyChangeListener, setDesignTimeLookAndFeel(LookAndFeel), setDesignTimeLookAndFeel(String)
 o addSourceFileListener
public abstract void addSourceFileListener(SourceFileListener listener)
Adds a SourceFileListener to all SourceFiles. After this call, the listener will be listening to changes to any SourceFile. A SourceFileListener can listen to a specific SourceFile by calling that SourceFile's addSourceFileListener() method.

Parameters:
listener - the object that receives notifications
See Also:
removeSourceFileListener, addSourceFileListener
 o beginUndo
public abstract void beginUndo(String commandName)
Call before starting an undoable operation.

Parameters:
commandName - the command text for the undo menu, one of:
  • UNDOCUT - menu text for undoing a cut,
  • UNDOPASTE - menu text for undoing a paste,
  • UNDODELETE - menu text for undoing a delete,
  • UNDODRAGDROP - menu text for undoing a drag-n-drop,
  • UNDOPROPERTYEDIT - menu text for undoing a property edit,
  • UNDOINSERT - menu text for undoing an insert, or
  • any other text that specifies a different action.
 o clearUndo
public abstract void clearUndo()
Call when starting an operation that can't be undone. Disables the "undo" menu selection.

 o createDefaultProject
public abstract com.symantec.itools.vcafe.openapi.VisualProject createDefaultProject()
Creates a new project in Visual Cafe, using the default Project Template. The project becomes the target project.

Returns:
the new project, or null if it cannot be created.
See Also:
getProjectTemplates, createProject, createEmptyProject, getTargetProject
 o createEmptyProject
public abstract com.symantec.itools.vcafe.openapi.VisualProject createEmptyProject()
Creates a new project in Visual Cafe, using the Empty Project Template. The project becomes the target project.

Returns:
the new project, or null if it cannot be created.
See Also:
getProjectTemplates, createProject, createDefaultProject, getTargetProject
 o createProject
public abstract com.symantec.itools.vcafe.openapi.VisualProject createProject(VisualObject projectTemplate)
Creates a new project in Visual Cafe, using the specified projectTemplate. The project becomes the target project.

Parameters:
projectTemplate - a Project Template describing the initial state of the project.
Returns:
the new project, or null if it cannot be created.
See Also:
getProjectTemplates, createEmptyProject, createDefaultProject, getTargetProject
 o createVisualObject
public abstract com.symantec.itools.vcafe.openapi.VisualObject createVisualObject(Class clazz)
Creates a new VisualObject that represents an object of the given class. The Class must already have an entry in the ComponentLibrary.

Parameters:
clazz - the Class of the new VisualObject.
Returns:
a new VisualObject.
See Also:
createVisualObjectByName
 o createVisualObjectByName
public abstract com.symantec.itools.vcafe.openapi.VisualObject createVisualObjectByName(String className)
Create a new VisualObject that represents an object of the given class. The class must already have an entry in the ComponentLibrary.

Parameters:
className - the class name of the new VisualObject.
Returns:
a new VisualObject.
See Also:
createVisualObject
 o endUndo
public abstract void endUndo()
Call when done with an undoable operation.

 o getActiveObjects
public abstract com.symantec.itools.vcafe.openapi.VisualObject[] getActiveObjects()
Gets an array of VisualObjects that are active in the Property List of Visual Cafe. If there are no active VisualObjects, a zero-length array is returned.

Returns:
an array containing objects of type VisualObject.
 o getAttributes
public abstract com.symantec.itools.vcafe.openapi.Attributes getAttributes()
Get the Attributes object that global (program-wide) named value storage. The values stored in the returned Attributes object are associated with the Visual Cafe program (are global), not with a specific project. To associate named values with a specific project, use that VisualProject's getAttributes() method.

Returns:
the global Attributes storage object.
See Also:
getAttributes
 o getClientAreaBounds
public abstract java.awt.Rectangle getClientAreaBounds()
Returns the dimensions of the client area of Visual Cafe's main frame window.

Returns:
the bounds of the client area of the main frame window.
 o getClipboard
public abstract com.symantec.itools.vcafe.openapi.datatransfer.VisualCafeClipboard getClipboard()
Gets Visual Cafe's clipboard object.

Returns:
the clipboard object that allows datatransfer between Java and Visual Cafe.
 o getComponentLibrary
public abstract com.symantec.itools.vcafe.openapi.ComponentLibrary getComponentLibrary()
Gets the Visual Repository object that allows access to Visual Cafe's Component Library.

Returns:
the ComponentLibrary.
See Also:
VisualRepository, ComponentLibrary
 o getContextualMenu
public abstract com.symantec.itools.vcafe.openapi.VisualMenu getContextualMenu(int popupType)
Returns a popup menu in Visual Cafe

Parameters:
popupType - the type of popup menu, one of:
  • OBJECT_VIEW_TAB_POPUP - popup menu in objects tab of project window,
  • PACKAGE_VIEW_TAB_POPUP - popup menu in packages tab of project window,
  • FILE_VIEW_TAB_POPUP - popup menu in files tab of project window,
  • SOURCE_EDITOR_POPUP - popup menu in source code editor window,
  • FORM_EDITOR_POPUP - popup menu in form editor window,
  • COMP_LIBRARY_POPUP - popup menu in component library window
  • CLASS_BROWSER_CLASSES_PANE_POPUP - popup menu in classes pane of class browser
  • CLASS_BROWSER_MEMBERS_PANE_POPUP - popup menu in members pane of class browser
  • CLASS_BROWSER_EDITOR_PANE_POPUP - popup menu in editor pane of class browser
Returns:
the requested menu
See Also:
VisualMenu
 o getDesignTimeLookAndFeel
public abstract com.sun.java.swing.LookAndFeel getDesignTimeLookAndFeel()
Gets the current design time look-and-feel.

Returns:
the current design time look-and-feel.
See Also:
setDesignTimeLookAndFeel(LookAndFeel), setDesignTimeLookAndFeel(String), updateDesignTimeLookAndFeelUI
 o getDirectory
public abstract java.lang.String getDirectory()
Gets Visual Cafe's "current directory". This is the directory that would be displayed in the open file dialog.

Returns:
path to the current directory.
See Also:
setDirectory
 o getEnvironmentOptionSet
public abstract com.symantec.itools.vcafe.openapi.options.EnvironmentOptionSet getEnvironmentOptionSet()
Gets the EnvironmentOptionSet object which allows access to Visual Cafe's environment options.

Returns:
the environment's options access API object.
 o getFrontmostSourceFile
public abstract com.symantec.itools.vcafe.openapi.SourceFile getFrontmostSourceFile()
Returns an object that represents the frontmost SourceFile window.

Returns:
the topmost SourceFile object.
 o getFrontmostWindow
public abstract java.lang.Object getFrontmostWindow()
Returns an object that represents the frontmost window. Currently, can return objects of type: VisualProject (for active project windows), SourceFile (for active source editor windows), and VisualRepository (for the Component Library). If the frontmost window is not one of these, null is returned.

Returns:
the topmost window object.
 o getInstallDirectory
public abstract java.lang.String getInstallDirectory()
Gets the installation (bin) directory of Visual Cafe.

Returns:
path to the install directory.
 o getMainFrameBounds
public abstract java.awt.Rectangle getMainFrameBounds()
Returns the dimensions of Visual Cafe's main frame window.

Returns:
the bounds of the main frame window.
 o getMenuBar
public abstract java.awt.MenuBar getMenuBar()
Gets the top level menubar in Visual Cafe.

Returns:
a MenuBar object that represents the menu bar in Visual Cafe.
 o getOptionsWindow
public abstract com.symantec.itools.vcafe.openapi.pluginapi.OptionsWindow getOptionsWindow()
Returns the options window being opened in Visual Cafe. One of:

Returns:
the environment/project Options window
See Also:
OptionsWindow
 o getProductEdition
public abstract com.symantec.itools.vcafe.openapi.ProductEdition getProductEdition()
Returns an object that provides information about which edition of Visual Cafe is running.

Returns:
the object providing edition information.
See Also:
ProductEdition
 o getProject
public abstract com.symantec.itools.vcafe.openapi.VisualProject getProject(String projectName)
Gets the open project with the given name in Visual Cafe.

Parameters:
projectName - the name of the open project.
Returns:
the named project, or null if it cannot be found.
See Also:
getTargetProject, getProjects
 o getProjectTemplates
public abstract com.symantec.itools.vcafe.openapi.VisualObject[] getProjectTemplates()
Returns an array of all of the installed Project Templates (as appearing in the Project Templates group of the Component Library).

Returns:
array of VisualObjects representing the installed Project Templates.
See Also:
createProject, createEmptyProject, createDefaultProject
 o getProjects
public abstract com.symantec.itools.vcafe.openapi.VisualProject[] getProjects()
Returns an array of all of the open projects in Visual Cafe. If no projects are open, a zero-length array is returned.

Returns:
an array of VisualProjects
See Also:
getProject, getTargetProject
 o getSourceFile
public abstract com.symantec.itools.vcafe.openapi.SourceFile getSourceFile(String filename)
Gets the SourceFile with the specified name. Note: unlike getSourceFiles(), this method will return a SourceFile even if it isn't currently open in Visual Cafe.

Parameters:
filename - name of the file to get.
Returns:
the named SourceFile, or null if not found.
See Also:
getSourceFiles, getSourceFile(File)
 o getSourceFile
public abstract com.symantec.itools.vcafe.openapi.SourceFile getSourceFile(File file)
Returns a SourceFile for the given File. Note: unlike getSourceFiles(), this method will return a SourceFile even if it isn't currently open in Visual Cafe.

Parameters:
file - the file to get.
Returns:
the SourceFile, or null if not found.
See Also:
getSourceFiles, getSourceFile(String)
 o getSourceFiles
public abstract com.symantec.itools.vcafe.openapi.SourceFile[] getSourceFiles()
Returns an array of all of the open source files in Visual Cafe. If no source files are open, a zero-length array is returned.

Returns:
an array of open source files.
See Also:
getSourceFile(String), getSourceFile(File)
 o getTargetProject
public abstract com.symantec.itools.vcafe.openapi.VisualProject getTargetProject()
Gets the target or current project in Visual Cafe.

Returns:
the current VisualProject, or null if no projects are open.
See Also:
getProject, getProjects
 o getVisualCafe
public static com.symantec.itools.vcafe.openapi.VisualCafe getVisualCafe()
Gets the object that implements the VisualCafe API. There is only one instance of this class. This method never returns null.

Returns:
the VisualCafe object.
 o invokeHelp
public abstract void invokeHelp(int helpId)
Activates online help displaying the link specified by the given help id.

Parameters:
helpId - the help id to use. (Note: HID_BASE_RESOURCE is added before WinHelp() is invoked).
 o invokeHelp
public abstract void invokeHelp(File helpFile,
                                int helpId)
Activates online help displaying the link specified by the given help id, in the specified help file.

Parameters:
helpFile - the (WinHelp) help file to use.
helpId - the help id to use. (Note: HID_BASE_RESOURCE is added before WinHelp() is invoked).
 o invokeHelp
public abstract void invokeHelp(String helpFileName,
                                int helpId)
Activates online help displaying the link specified by the given help id, in the help file with the specified name. If the helpFileName doesn't contain a path, the "help" directory is assumed.

Parameters:
helpFileName - the name of the help file to use.
helpId - the help id to use. (Note: HID_BASE_RESOURCE is added before WinHelp() is invoked).
 o isMDIEnabled
public abstract boolean isMDIEnabled()
Determines the current environment mode (MDI/SDI) of Visual Cafe. This method is valid only on the Windows platform. On the Macintosh platform, it returns false.

Returns:
true for MDI, false for SDI.
 o openProject
public abstract com.symantec.itools.vcafe.openapi.VisualProject openProject(String projectName)
Opens the project with the given name in Visual Cafe. The project becomes the target project.

Parameters:
projectName - the name of the project to open.
Returns:
the newly opened project, or null if it cannot be found.
See Also:
getTargetProject
 o registerEditor
public abstract void registerEditor(String[] targetClassNames,
                                    ActionListener l)
Register an editor to edit an object of type class. After this call, the listener will be notified when the user chooses to edit an object of the given class, from anywhere in the environment.

Parameters:
targetClassNames - array of strings denoting the type of objects for editing
listener - the object that receives notifications. example usage: // Register an object editor for SoftBevelBorder String[] objectType = { "com.symantec.itools.swing.borders.SoftBevelBorder" }; VisualCafe.getVisualCafe().registerEditor(objectType, new SymObjectEditorAction());
 o removeActiveVisualObjectListener
public abstract void removeActiveVisualObjectListener(ActiveVisualObjectListener listener)
Removes an ActiveVisualObjectListener. After this call, the listener will no longer be notified when a VisualObject is selected into the Property List.

Parameters:
listener - the object that was receiving notifications.
See Also:
addActiveVisualObjectListener, setActiveObjects(VisualObject[])
 o removeDTListener
public abstract void removeDTListener(DTListener listener)
Stop listening to when classes' design time information is reparsed. .

Parameters:
listener - the object that was receiving notifications.
See Also:
addDTListener, removeDTListener, DTListener
 o removeOptionsMenuItemListener
public abstract void removeOptionsMenuItemListener(int optionType,
                                                   ActionListener l)
Removes a ActionListener. After this call, the listener will not be notified when the user chooses to open Environment Options or Project Options window.

Parameters:
optionType - the type of options window. One of:
  • PROJECT_OPTIONS - the project options window
  • ENVIRONMENT_OPTIONS - the environment options window
listener - the object that was receiving notifications.
 o removeProjectSystemListener
public abstract void removeProjectSystemListener(ProjectSystemListener listener)
Stop listening to changes to Visual Cafe's project system.

Parameters:
listener - the object that was receiving notifications.
See Also:
addProjectSystemListener
 o removePropertyChangeListener
public abstract void removePropertyChangeListener(PropertyChangeListener listener)
Stops the specified listener from listening for PropertyChangeEvents generated by Visual Cafe.

Parameters:
listener - the object that was receiving notifications.
See Also:
addPropertyChangeListener
 o removeSourceFileListener
public abstract void removeSourceFileListener(SourceFileListener listener)
Removes a SourceFileListener from all SourceFiles. After this call, the listener will not be listening to changes to any SourceFile. A SourceFileListener can stop listenening to a specific SourceFile by calling that SourceFile's removeSourceFileListener() method.

Parameters:
listener - the object that was receiving notifications.
See Also:
addSourceFileListener, removeSourceFileListener
 o removeVisualObjectListener
public abstract void removeVisualObjectListener(VisualObjectListener listener)
Removes a VisualObjectListener from all VisualObjects. After this call, the listener will not be listening to changes to any VisualObject. A VisualObjectListener can stop listening to a specific VisualObject by calling that VisualObject's removeVisualObjectListener() method.

Parameters:
listener - the object that was receiving notifications
See Also:
addVisualObjectListener, removeVisualObjectListener
 o runInMainUIThread
public abstract void runInMainUIThread(Runnable runnable)
Executes a Runnable object in Visual Cafe's main UI thread.

If the caller is already running in the main UI thread, the Runnable's run() method is invoked immediately and runInMainUIThread() does not return until the run() method returns. If the caller is running in any other thread, the runnable is queued for later execution in the main UI thread and the caller returns immediately. This method can help performance when calling several openapi methods that individually execute in the main UI thread (for example, most of the com.symantec.itools.vcafe.openapi.dtreflect methods)

 o runInMainUIThreadAndWait
public abstract void runInMainUIThreadAndWait(Runnable runnable)
Executes a Runnable object in Visual Cafe's main UI thread and wait for completion.

runInMainUIThreadAndWait() does not return until the runnable's run() method has completed. This method can help performance when calling several openapi methods that individually execute in the main UI thread (for example, most of the com.symantec.itools.vcafe.openapi.dtreflect methods)

 o setActiveObjects
public void setActiveObjects(VisualObject[] visualObjects)
Sets an array of VisualObjects as active in the Property List of Visual Cafe. The previously selected property remains selected if it exists for the list of objects.

Parameters:
visualObjects - an array containing objects of type VisualObject.
See Also:
setActiveObjects(VisualObject[], boolean)
 o setActiveObjects
public abstract void setActiveObjects(VisualObject[] visualObjects,
                                      boolean forceDefaultProperty)
Sets an array of VisualObjects as active in the Property List of Visual Cafe.

Parameters:
visualObjects - an array containing objects of type VisualObject.
forceDefaultProperty - if true, forces the default property for the object[s] to be selected. if false, the previously selected property remains selected (if it exists).
See Also:
setActiveObjects(VisualObject[])
 o setDesignTimeLookAndFeel
public abstract void setDesignTimeLookAndFeel(LookAndFeel newDesignTimeLookAndFeel)
Set the current design time look-and-feel. The new look-and-feel is applied to both new and existing Components.

This is a JavaBeans bound property.

Parameters:
newDesignTimeLookAndFeel - an object defining the UI's new look-and-feel.
See Also:
setDesignTimeLookAndFeel(String), getDesignTimeLookAndFeel, updateDesignTimeLookAndFeelUI
 o setDesignTimeLookAndFeel
public abstract void setDesignTimeLookAndFeel(String newDesignTimeLookAndFeelClassName) throws ClassNotFoundException, InstantiationException, IllegalAccessException
Set the current design time look-and-feel. The new look-and-feel is applied to both new and existing Components.

This is a JavaBeans bound property.

Parameters:
newDesignTimeLookAndFeelClassName - class name of an object defining the UI's new look-and-feel.
Throws: ClassNotFoundException
if the specified class cannot be located.
Throws: InstantiationException
if the specified class could not be constructed.
Throws: IllegalAccessException
if the specified class definition cannot be accessed (it's not public).
See Also:
setDesignTimeLookAndFeel(LookAndFeel), getDesignTimeLookAndFeel, updateDesignTimeLookAndFeelUI
 o setDirectory
public abstract boolean setDirectory(String newDirectory)
Sets Visual Cafe's "current directory". This is the directory that would be displayed in the open file dialog.

Parameters:
path - to the new directory.
Returns:
true if success, false otherwise.
 o setMessageText
public abstract void setMessageText(String message)
Displays a message on Visual Cafe status bar.

Parameters:
the - text to display.
 o setUndoCommandName
public abstract void setUndoCommandName(String commandName)
Sets the undo menu item to the specified text.

Parameters:
commandName - the command text for the undo menu, one of:
  • UNDOCUT - menu text for undoing a cut,
  • UNDOPASTE - menu text for undoing a paste,
  • UNDODELETE - menu text for undoing a delete,
  • UNDODRAGDROP - menu text for undoing a drag-n-drop,
  • UNDOPROPERTYEDIT - menu text for undoing a property edit,
  • UNDOINSERT - menu text for undoing an insert, or
  • any other text that specifies a different action.
 o startWaitCursor
public abstract void startWaitCursor()
Indicate to the user that a lengthy operation is starting. The Wait cursor is displayed until a matching call to stopWaitCursor(). This method must be matched by a call to stopWaitCursor(). example usage: VisualCafe.getVisualCafe().startWaitCursor(); try { ... ... lots of time consuming processing here ... ... } finally { VisualCafe.getVisualCafe().stopWaitCursor(); }

See Also:
stopWaitCursor()
 o stopWaitCursor
public abstract void stopWaitCursor()
Indicate that a lengthy operation has ended. The cursor is restored to its appearance before startWaitCursor() was called.

See Also:
startWaitCursor();
 o updateDesignTimeLookAndFeelUI
public abstract void updateDesignTimeLookAndFeelUI(Component component)
Changes the look-and-feel of a JComponent to match the current design time look-and-feel.

Parameters:
component - the component whose look-and-feel needs updating.
See Also:
setDesignTimeLookAndFeel(LookAndFeel), setDesignTimeLookAndFeel(String), getDesignTimeLookAndFeel

All Packages  Class Hierarchy  This Package  Previous  Next  Index